<?php
use app\admin\sdk\Thinkwechat;
use app\admin\sdk\Qwechat;
use app\admin\sdk\QErrCode;
use app\admin\sdk\Auth;


function qwe_init($id)
 {
        
    $options = model('admin/Qwe')->info($id);
    $weObj = new QWechat($options);
    $weObj->options=$options;
     return $weObj;
}



function qwe_error($weObj,$res='')
{
    // TODO::可能要发送邮件，并且记录错误
    if (!$res) {
        $error=ErrCode::getErrText($weObj->errCode);
        mylog($error);
        return $error;
    }

    return;
}





